<?php
	session_start();
include "../../public/common/common.php";
include "../../public/common/config.php";

$user_id = $_SESSION['home_userid'];
$sql = "select * from touch where user_id = {$user_id}";
$res = mysql_query($sql);

?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
		<?php
		include "../header.php"	
		?>
		<div class="content">
			<div class="floor">
				<div class="floorHeader">
					<div class="left">
						<span id="">
							个人中心
						</span>
					</div>
				</div>
				<div class="floorFooter">
					<div class="floorFooterLeft">
						<ul>
							<li><a href="userlist.php">查看联系方式</a></li>
							<li><a href="useradd.php">添加联系方式</a></li>
							<li><a href="orderlist.php">查看我的订单</a></li>
						</ul>
					</div>
					
					<div class="floorFooterRight">
						<table border="" cellspacing="" cellpadding="">
							<tr>
								<th>姓名</th>
								<th>地址</th>
								<th>电话</th>
								<th>邮箱</th>
								<th>修改</th>
								<th>删除</th>
							</tr>
							<?php
							while($row = mysql_fetch_assoc($res)){
								echo "<tr>
									<td>{$row['name']}</td>
									<td>{$row['addr']}</td>
									<td>{$row['tel']}</td>
									<td>{$row['email']}</td>
									<td><a href='useredit.php?id={$row['id']}'>修改</a></td>
									<td><a href='userdel.php?id={$row['id']}'>删除</a></td>
									</tr>";
							}
							?>
						
						
							
						</table>
					</div>
					
				</div>
			</div>
		</div>
	</body>
	
</html>
